﻿@{
   var currentController = ViewContext.RouteData.Values["controller"] as string ?? "Home";
   var currentAction = ViewContext.RouteData.Values["action"] as string ?? "Index";
   var currentPage = (currentController + "-" + currentAction).ToLower();
}
<div id="main_menu">
	<ul>
        <li>@Html.ActionLink("TRANG CHỦ", "Index", "Home", new { Area = "" },
                             new { @class = currentPage == "home-index" ? "active" : "" })</li>
        <li>@Html.ActionLink("GIỎ HÀNG", "Index", "Cart", new { Area = "" },
                             new { @class = currentPage == "cart-index" ? "active" : "" })</li>
         @if (Roles.IsUserInRole("Administrator"))
         {
              <li>@Html.ActionLink("Quản lý sản phẩm", "Index", "Product", new { Area = "Admincp" },
                            new { @class = currentPage == "product-index" ? "active" : "" })</li>
         }
          @if (Roles.IsUserInRole("Administrator") || Roles.IsUserInRole("Reseller"))
         { 
             <li>@Html.ActionLink("Đại lý giao hàng", "Index", "Reseller", new { Area = "Admincp" },
                                  new { @class = currentPage == "reseller-index" ? "active" : "" })</li>
             <li>@Html.ActionLink("Thống kê hóa đơn", "BillReport", "Report", new { Area = "Admincp" },
                                  new { @class = currentPage == "report-billreport" ? "active" : "" })</li>
              
         }
            
    </ul>
</div><!--End main_menu-->